<?php


namespace app\api\controller;

use app\BaseController;
use app\common\service\supplier\JumpTypeService;
use app\model\PageSetting;
use think\Request;

class Takeout extends BaseController
{
    protected $middleware = [
        \app\middleware\ApiChannel::class,
        \app\middleware\ApiAgentConfig::class,
    ];

    protected function initialize()
    {
        parent::initialize();
    }

    /**
     * @note 本地生活顶部推荐new
     * @access public
     * @method get
     * @author ymzhang
     * @date 2022-09-02
     * @time 14:55
     * @returns
     */
    public function getJumpConfig(Request $request)
    {
        $params = $request->param();
        if ($params['type'] != PageSetting::TYPE_TACKOUT) {
            return fail('类型参数错误');
        }
        return (new JumpTypeService())->getJumpConfig($params);
    }

}